package junyi.card;

/**
 * User: Junyi BEI
 * Date: 12-9-30
 * Time: 下午1:55
 */
public class CardClass  implements CardProperty{
  private int classInt;
  public final static CardClass DIAMOND = new CardClass(0);
  public final static CardClass CLUB = new CardClass(10);
  public final static CardClass HEART = new CardClass(20);
  public final static CardClass SPADE = new CardClass(30);

  public CardClass(int c) {
    classInt = c;
  }

  public int getClassInt() {
    return classInt;
  }

  public int greaterThan(Card c) {
    return CardProperty.FAILURE;
  }

  public int lessThan(Card c) {
    return CardProperty.FAILURE;
  }

  public int equalsTo(Card c) {
    if(c.getCardClass().getClassInt() == classInt) {
      return CardProperty.SUCCESS;
    }
    return CardProperty.FAILURE;
  }
}
